import Cookies from 'js-cookie'

const TokenKey = 'hrsass-148'

/**
 * 根据key 去获取cookie的值
 * @returns
 */
export function getToken() {
  return Cookies.get(TokenKey)
}

/**
 * 根据key和value来设置cookie
 * @param {*} token
 * @returns
 */
export function setToken(token) {
  return Cookies.set(TokenKey, token)
  // localStoarge.setItem(key,value)
}

/**
 * 清除cookie的值
 * @returns
 */
export function removeToken() {
  return Cookies.remove(TokenKey)
}
